package com.pig4cloud.pigx.shop.user.api.feign;

import com.pig4cloud.pigx.common.core.constant.SecurityConstants;
import com.pig4cloud.pigx.common.core.constant.ServiceNameConstants;
import com.pig4cloud.pigx.common.core.util.R;
import com.pig4cloud.pigx.shop.user.api.entity.ShopUserPointPolicy;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.List;

@FeignClient(contextId = "remoteShopUserPointPolicyService", value = ServiceNameConstants.SHOP_USER_SERVICE)
public interface RemoteShopUserPointPolicyService {

	/**
	 * 根据ID列表获取积分策略
	 * @param ids
	 * @param from
	 * @return
	 */
	@PostMapping("/point/policy/getPointPolicyByIds")
	R<List<ShopUserPointPolicy>> getPointPolicyByIds(@RequestBody List<Long> ids,
			@RequestHeader(SecurityConstants.FROM) String from);

}
